<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-15 21:52:37
 * @LastEditTime: 2019-10-16 09:54:07
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div class="w">
    <div class="header curpoit">
      <p  @click="goredict">实名认证</p>
      <p  @click=" gosvaemon" class="linetobottom">保证金</p>
      <p @click="goejor">分成资格</p>
    </div>
    <div>
      <el-row>
        <el-col :span="10" :offset="1">
          <el-form ref="form" :model="form" label-width="100px" label-position="right">
            <el-form-item label="证券营业部:">
              <el-input v-model="form.name" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="证券账号:">
              <el-input v-model="form.name1" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="通道密码:">
              <el-input v-model="form.name2" placeholder="必填"></el-input>
            </el-form-item>
            <el-form-item label="证卷密码:">
              <el-input v-model="form.name3" placeholder="必填"></el-input>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="11" :offset="1" class="playce">
          <!-- 上传 -->
          <h3>上传证据账户截图:</h3>
          <el-upload
            class="avatar-uploader"
            action="#"
            :show-file-list="false"
            :on-success="handleAvatarSuccess"
            :before-upload="beforeAvatarUpload"
          >
            <img v-if="imageUrl" :src="imageUrl" class="avatar" />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
          <el-image style="width: 110px; height: 110px" src="url" fit="fit"></el-image>
        </el-col>
      </el-row>
      <el-row style="margin-top:10px;line-height: 30px;">
        <el-col :span="20" :offset="2">
          <h3>温馨提示</h3>
        </el-col>
        <el-col :span="20" :offset="2">1、证券账户在平台指定的证券营业部开立(具体请联系客服索要)，并签订 保证金托管协议，方可托管保证金。</el-col>
        <el-col :span="20" :offset="2">2、证券账户截图可以由客服协助操作，填好资料，即可申请。</el-col>
        <el-col :span="20" :offset="2">3、未通过保证金认证的客户，保证金由平台托管，平台接受保证金的账号见下方。</el-col>
        <el-col :span="20" :offset="1">
          <h3>接受保证金账号:</h3>
        </el-col>
        <el-col :span="20" :offset="2" class="juzjianb">
          <p>1、户名:李宽</p>
          <p>银行开户行:招商银</p>
          <p>6214855122175595</p>
        </el-col>
        <el-col :span="20" :offset="2" class="juzjianb">
          <p>1、户名:李宽</p>
          <p>银行开户行:招商银</p>
          <p>6214855122175595</p>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: "",
        name1: "",
        name2: "",
        name3: ""
      },
      imageUrl: "",
      url:
        "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      srcList: [
        "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
        "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg"
      ]
    };
  },
  methods: {
    handleAvatarSuccess(res, file) {
      this.imageUrl = URL.createObjectURL(file.raw);
      console.log(this.imageUrl);
    },
    beforeAvatarUpload(file) {
      const isJPG = file.type === "image/jpeg";
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 格式!");
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return isJPG && isLt2M;
    },
    fucker() {
      console.log("上传成功");
    },
      goredict(){
              this.$router.push({path:"/Account/Certification"})
            },
            gosvaemon(){
              this.$router.push({path:"/Account/Margin"})
            },
            goejor(){
                 this.$router.push({path:"/Account/quali"})
            }
  }
};
</script>

<style >
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  
}
.playce {
  padding: 30px 0;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.juzjianb {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 110px;
  height: 110px;
  line-height: 110px;
  text-align: center;
}

.avatar {
  width: 110px;
  height: 110px;
  display: block;
}
</style>
